The present disclosure relates to an electronic apparatus that performs a host determination in which a device that performs control is determined from a plurality of connected devices, and to a host determination method.
Hereinafter, a host (or a host device) means a device that has a control function of issuing a command to an electronic apparatus (hereinafter, referred to as “device”). Further, the electronic apparatus (device) means a device or an electronic component that has functions of receiving a command from a host and performing some processing. Additionally, a host candidate (or a host candidate device) means a device that has a function to be a host.
FIG. 9 is a diagram showing a connection example of devices in the case where a device A is connected to a host candidate A and has one interface (also referred to as IF1).
As shown in FIG. 9, in the case where the device A has one interface (IF1), it is advantageous that a connection control system of the device A is made simple. However, on the contrary, it is difficult to connect the device A to a host candidate (not shown) having an interface other than the interface (IF1).
To eliminate such a disadvantage and improve the usability, it may be better to provide the device with a plurality of interfaces.
FIG. 10A is a diagram showing that a device B has a plurality of interfaces and connected to a host candidate A. FIG. 10B is a diagram showing that the device B having a plurality of interfaces is connected to a host candidate B.
Although the surface of the device B on which connectors are provided is not seen in FIGS. 10A and 10B, most commonly, at least two connectors that correspond to the respective host candidates A and B are provided side by side on the surface. Thus, more variety of devices are connectable compared to the case of FIG. 9, and more usable devices can be provided.
However, in the case where the device has a plurality of interfaces (IF1, IF2) as shown in FIGS. 10A and 10B, a new disadvantage that is not caused in the configuration of FIG. 9 is caused.
Specifically, when a plurality of host candidates connected to the interfaces (IF1, IF2) are simultaneously set as hosts and are going to control the device, data competition occurs and the device may malfunction. To prevent the data competition the malfunction of the device, it is necessary to use a host determination method, by which one host candidate is determined to be a host from host candidates connected to the plurality of interfaces (IF1, IF2).
In the case of a storage device, at least one interface thereof often conforms to the specifications of a USB (Universal Serial Bus) Mass Storage Class, in terms of compatibility with existing hosts.
A host candidate that is connected to a device conforming to the USB Mass Storage Class through a USB cable will be hereinafter described as a “USB connectable host candidate”. When an interface is connected to the USB connectable host candidate, for example, when the USB connectable host candidate is connected to a device through a USB cable, the USB connectable host candidate starts the control from the position of a host. In the control from the position a host in which data in the device is reads or written, the USB connectable host candidate first acquires a list of information in the device and then reads or writes the information in the device based on the acquired list of information in the device. Further, in response to disconnection of the interface, for example, removal of the USB cable from the device, the USB connectable host candidate terminates the control of the device from the position of a host.
In such a specific host candidate, for example, the interface of which conforms to the USB Mass Storage Class, when a cable is inserted into a connector of the device, the specific host candidate is going to act as a host, irrespective of the existence of other host candidates. Examples of the specific host candidate that behaves in such a way include a so-called Wi-Fi (registered trademark) memory card, in addition to the USB connectable host candidate. The Wi-Fi memory card is inserted into or removed from a slot of a device and a control function of a wireless LAN terminal is implemented on the Wi-Fi memory card, for example. The Wi-Fi memory card is different from a normal memory card in a host function specialized for wireless transmission and reception.
It should be noted that the device is not limited to the storage device. The USB connectable host candidate may be a small wireless transceiver that is directly provided to a USB connector of a device.
Many of the specific host candidates having various forms as described above are each set as a host by insertion or removal of a cable or a connector. In such a case, a host determination method in which insertion or removal of a cable, a connector, or the like is taken into consideration and an electrical connection or disconnection of an interface is included is necessary.
It should be noted that the phrase “connection or disconnection of an interface” is used as a broad concept meaning an electrical connection or disconnection of an interface, regardless of the presence or absence of a mechanical operation such as insertion or removal of a cable or a connector.
Japanese Patent Application Laid-open No. 2008-97308 (hereinafter, referred to as Patent Document 1), Japanese Utility Model Registration No. 3109346 (hereinafter, Patent Document 2), Japanese Patent Application Laid-open No. 2010-33519 (hereinafter, Patent Document 3), and Japanese Patent No. 4438846 (hereinafter, Patent Document 4) are known for disclosure of the system for achieving the host determination as described above.
Patent Document 1 discloses an electronic apparatus (device) that includes one common connector having a structure for exclusively connecting interfaces on two sides. Patent Document 1 adopts a determination method of limiting the number of host candidates simultaneously connected to a device to one by the provision of the common connector and determining the host candidate connected to the device to be a host.
FIG. 11 is a block diagram of a device B, showing the configuration disclosed in Patent Document 1 by restructuring the configuration for each function.
A host candidate A shown in FIG. 11 is a host candidate (USB connectable host candidate) having a USB interface. A host candidate B is a host candidate having a memory card interface.
The device B shown in FIG. 11 includes an IF_A function unit, an IF_B function unit, a controller, and a data processing unit.
The IF_A function unit and the IF_B function unit are processing parts of the interfaces to which the host candidate A and the host candidate B individually correspond, respectively.
In this configuration, only one of the host candidate A and the host candidate B is connectable to a common connector. The connected host candidate can access the data processing unit via the IF_A function unit or IF_B function unit and the controller.
Patent Document 2 discloses an electronic apparatus equipped with a connector of a USB interface and a connector of a memory card interface.
In Patent Document 2, the following determination method is adopted. In the case where one host candidate is connected to the connector of the device B, the host candidate is set as a host, and in the case where two host candidates are connected to the connectors of the device B, a host candidate having a memory card interface is inevitably set as a host.
FIG. 12 is a diagram obtained by changing FIGS. 10A and 10B so as to show a connection relationship equivalent to that of a device C disclosed in Patent Document 2 (the device B is changed to the device C). It should be noted that Patent Document 2 discloses a configuration in which the device C is a strobe control apparatus having a duplex interface, and two host candidates as a memory card control chip and a USB control chip are connected to the strobe control apparatus.
FIG. 13 is a block diagram of the device C, showing the configuration disclosed in Patent Document 2 by restructuring the configuration so as to correspond to FIG. 12.
A host candidate A shown in FIG. 13 is a host candidate (USB connectable host candidate) having a USB interface (corresponding to IF1). In Patent Document 2, a USB control chip corresponds to the host candidate A.
A host candidate B is a host candidate having a memory card interface (corresponding to IF2). In Patent Document 2, a memory card control chip corresponds to the host candidate B.
A device C having the configuration shown in FIG. 13 includes an IF_A function unit, an IF_B function unit, a memory, a connection detection unit, and a switching unit.
The IF_A function unit and the IF_B function unit are processing parts of the interfaces (IF1 and IF2) of the host candidate A and the host candidate B, respectively.
The connection detection unit refers to a specific signal in a signal group that is input to the memory card interface (for example, IF2). When the potential of the signal referred to is equal to a ground potential, the connection detection unit determines that the host candidate B is connected to a connector of the memory card interface of the device C. On the other hand, when the difference between the potential of the signal referred to and a ground potential is large and an open state is determined, the connection detection unit determines that the host candidate B is not connected to the connector of the memory card interface of the device C.
In the case where the connection detection unit detects that the host candidate B is connected, the switching unit disconnects the USB interface (for example, IF1) on the host candidate A side. In the case where the connection detection unit detects that the host candidate B is not connected, the switching unit connects the USB interface on the host candidate A side.
In the case where the host candidate B is connected, the memory is accessed by the host candidate B via the IF_B function unit in a disconnected state of the USB interface of the host candidate A. On the other hand, in the case where the host candidate B is not connected, the USB interface of the host candidate A is connected, and therefore the memory is accessed by the host candidate A via the IF_A function unit.
Patent Document 3 discloses an electronic apparatus equipped with a connector of a USB interface (IF1) and a connector of any second interface (IF2).
In Patent Document 3, the following determination method is adopted. In the case where one host candidate is connected to a connector of a device C, the host candidate is set as a host, and in the case where two host candidates are connected to the connector of the device C, a host candidate having a USB interface (IF1) is set as a host on the condition that the host candidate is continuously connected to the connector for a predetermined period of time or more.
FIG. 14 is a block diagram of the device C, showing the configuration disclosed in Patent Document 3 by restructuring the configuration so as to correspond to the block diagrams of the other Patent Documents.
A host candidate A shown in FIG. 14 is a host candidate (USB connectable host candidate) having a USB interface (IF1). A host candidate B is a host candidate having a second interface (IF2).
The device C shown in FIG. 14 includes an IF_B function unit, a data selection unit, a connection detection unit, and a data processing unit.
The IF_B function unit is a processing part of the interface (IF2) of the host candidate B.
The data selection unit is a conversion part of a signal of the interface (IF2) of the host candidate B and a signal of an interface (IF1) of the host candidate A. The data selection unit also has a function of the IF_A function unit shown in FIG. 13, for example.
The connection detection unit refers to a specific signal in a signal group that is input to the USB interface (IF1). When the potential of the signal referred to is equal to 5V, the connection detection unit determines that the host candidate A is connected to a connector of the USB interface (IF1) of the device. In the case where the potential of the signal referred to is largely different from 5V and an open state is determined, the connection detection unit determines that the host candidate A is not connected.
The connection detection unit transmits a detection result as to whether the host candidate A is connected or not to the data selection unit. In the case where the connection detection unit detects that the host candidate A is connected, the data selection unit prohibits access from the host candidate B through the second interface (IF2) and permits access from the host candidate A. Thus, the data processing unit is accessed from the host candidate A.
On the other hand, in the case where the connection detection unit detects that the host candidate A is not connected, access permission is given to the second interface (IF2) side. Thus, the data processing unit is accessed from the host candidate B through the IF_B function unit.
By the connection processing described above, in the case where the host candidate A is continuously connected for a predetermined period of time or more, the data processing unit is accessed from the host candidate A, regardless of whether the host candidate B is connected or not. On the other hand, in the case where the host candidate A is not continuously connected for a predetermined period of time or more, the interface of the host candidate B is connected. Thus, the data processing unit is accessed from the host candidate B via the IF_B function unit.
Patent Document 4 discloses a device equipped with a connector of a USB interface and a connector of a PCI_EXPRESS interface.
Patent Document 4 adopts the following method. In a storage device capable of simultaneously connecting connectors of interfaces on two sides to a host, a host is determined by the logic of a switching signal (applied signal of an IFSEL (interface selection) terminal) from the outside.
FIG. 15 is a diagram obtained by changing FIG. 12 so as to show a connection relationship equivalent to that of a device disclosed in Patent Document 4.
FIG. 16 is a block diagram of the device D, showing the configuration disclosed in Patent Document 4 by restructuring the configuration so as to correspond to FIG. 15.
A host A shown in FIG. 16 is a host having a USB interface (for example, IF1) and a PCI_EXPRESS interface (for example, IF2). A device D is a device conforming to both the interfaces. Patent Document 4 discloses, as a configuration corresponding to the device D, an Express Card serving as a removable memory card having a PCI_Express and a USB as external interfaces.
The device D having the configuration shown in FIG. 16 includes an IF_A function unit, an IF_B function unit, a controller, and a memory.
The IF_A function unit is a processing part of the USB interface. When a switching signal is 1 (power potential), the signal is valid, and when the switching signal is 0 (ground potential), the signal is invalid. The IF_B function unit is a processing part of the PCI_EXPRESS interface. When a switching signal is 0 (ground potential), the signal is valid, and when the switching signal is 1 (power potential), the signal is invalid. Further, the device D includes an input terminal (IFSEL terminal) exclusively for a switching signal, which is provided separate from the above-mentioned interfaces.
Therefore, one of the interfaces is selected according to the logic of the switching signal, and access to the memory is permitted via the selected interface and the controller.